package zl.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import zl.group.AddUserGroup;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    private Integer id;
    @NotBlank(message = "用户账号不能为空" , groups = AddUserGroup.class)
    private String username;
    @NotBlank(message = "用户密码不能为空" , groups = AddUserGroup.class)
    private String password;
    @NotBlank(message = "用户名不能为空")
    private String nickname;
    @Email(message = "邮箱格式错误")
    private String email;
    private String image;
    private String phone;
    private String profile;
    @NotBlank(message = "用户身份不能为空")
    private String role;
}
